﻿<!--                                                             -->
<!-- Copyright (C) Microsoft Corporation. All rights reserved.   -->
<!--                                                             -->


<ResourceDictionary 
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:sys="clr-namespace:System;assembly=mscorlib"
  xmlns:converters="clr-namespace:Microsoft.LibraryManagerDemo.Converters"
  xmlns:models="clr-namespace:Microsoft.LibraryManagerDemo.Models"
  xmlns:controls="clr-namespace:Microsoft.LibraryManagerDemo.Controls">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="pack://application:,,,/Resources/ToolBar.xaml" />
    </ResourceDictionary.MergedDictionaries>

    <!--
  *****************************************************************************
  DEFAULT.XAML
  This is the default theme for the application.
  *****************************************************************************
  -->

    <!-- 
  *****************************************************************************
  DATA (CONVERTERS, ETC.) 
  *****************************************************************************
  -->

    <!-- 
  *****************************************************************************
  COMMON BRUSHES AND TEXT STYLES 
  *****************************************************************************
  -->

    <LinearGradientBrush x:Key="Brush_ToolBarBackground" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Offset="0" Color="#8C8C8C"/>
        <GradientStop Offset="1" Color="#525252"/>
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="Brush_ToolBarBorder" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Offset="0" Color="#DCDCDC"/>
        <GradientStop Offset="1" Color="#636363"/>
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="Brush_FilmStripBackground" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Offset="0" Color="#8C8C8C"/>
        <GradientStop Offset="1" Color="#525252"/>
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="Brush_FilmStripBorder" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Offset="0" Color="#DCDCDC"/>
        <GradientStop Offset="1" Color="#636363"/>
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="Brush_StandardBackground" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Offset="0" Color="#8C8C8C"/>
        <GradientStop Offset="1" Color="#525252"/>
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="Brush_StandardBorder" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Offset="0" Color="#DCDCDC"/>
        <GradientStop Offset="1" Color="#636363"/>
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="Brush_PopupBackground" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Offset="0" Color="#606060"/>
        <GradientStop Offset="1" Color="#282828"/>
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="Brush_PopupBorder" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Offset="0" Color="#FF909090"/>
        <GradientStop Offset="1" Color="#00000000"/>
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="Brush_ControlNormal" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Offset="0" Color="#8E8E8E"/>
        <GradientStop Offset="1" Color="#5B5B5B"/>
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="Brush_ControlPressed" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Offset="0" Color="#606060"/>
        <GradientStop Offset="1" Color="#505050"/>
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="Brush_ControlMouseOver" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Offset="0" Color="#A0A0A0"/>
        <GradientStop Offset="1" Color="#606060"/>
    </LinearGradientBrush>    

    <RadialGradientBrush x:Key="Brush_BackgroundGlow">
        <RadialGradientBrush.RelativeTransform>
            <TransformGroup>
                <ScaleTransform CenterX="0.5" CenterY="0.5"/>
                <TranslateTransform Y="-0.2"/>
            </TransformGroup>
        </RadialGradientBrush.RelativeTransform>
        <GradientStop Offset="1" Color="#00FFFFFF"/>
        <GradientStop Offset="0" Color="#80FFFFFF"/>
    </RadialGradientBrush>

    <LinearGradientBrush x:Key="Brush_ToolBarButtonOverlay" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Offset="0" Color="#A0FFFFFF"/>
        <GradientStop Offset="1" Color="#40FFFFFF"/>
    </LinearGradientBrush>

    <SolidColorBrush x:Key="Brush_ButtonGlow" Color="#50FFFFFF" />

    <LinearGradientBrush x:Key="Brush_AlbumGlass" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Offset="0" Color="#60FFFFFF"/>
        <GradientStop Offset="1" Color="#80101010"/>
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="Brush_PhotoSelectionIndicator" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Offset="0" Color="#F0F0F0"/>
        <GradientStop Offset="1" Color="#AAAAAA"/>
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="Brush_SensorProgressBackground" MappingMode="Absolute" SpreadMethod="Repeat" StartPoint="0,0" EndPoint="0,8">
        <GradientStop Offset="0" Color="#FF93CDEF"/>
        <GradientStop Offset="0.6" Color="#FF93CDEF"/>
        <GradientStop Offset="0.6" Color="#0093CDEF"/>
    </LinearGradientBrush>

    <SolidColorBrush x:Key="Brush_MainBackground" Color="#111111"/>
    <SolidColorBrush x:Key="Brush_DarkControlBackground" Color="#303030"/>
    <SolidColorBrush x:Key="Brush_EtchDark" Color="#60000000"/>
    <SolidColorBrush x:Key="Brush_EtchLight" Color="#80FFFFFF"/>
    <SolidColorBrush x:Key="Brush_ToolBarEtchDark" Color="#60000000"/>
    <SolidColorBrush x:Key="Brush_ToolBarEtchLight" Color="#80FFFFFF"/>
    <SolidColorBrush x:Key="Brush_AlbumGlassHighlight" Color="#4C4AFCF6"/>
    <SolidColorBrush x:Key="Brush_Icon" Color="#FFFFFF" />
    <SolidColorBrush x:Key="Brush_PhotoSelectionArrow" Color="#F0F0F0" />
    <SolidColorBrush x:Key="Brush_ToolBarForeground" Color="White" />

    <!-- 
  *****************************************************************************
  COMMON GRAPHICS AND PATH DATA 
  *****************************************************************************
  -->

    <Geometry x:Key="DownArrow">M0,0 L1,0 0.5,1Z</Geometry>
    <Geometry x:Key="UpArrow">M0,1 L1,1 0.5,0Z</Geometry>
    <Geometry x:Key="RightArrow">M0,0 L1,0.5 0,1Z</Geometry>
    <Geometry x:Key="LeftArrow">M0,0.5 L1,1 1,0Z</Geometry>
    <Geometry x:Key="CloseX">M0,0 L1,1 M0,1 L1,0</Geometry>

    <!-- 
  *****************************************************************************
  CONTROL STYLES 
  *****************************************************************************
  -->
    
    <converters:DefaultImageConverter x:Key="DefaultImageConverter" />
    
    <DataTemplate x:Key="LibraryDataTemplate" DataType="{x:Type models:Library}">
        <Grid HorizontalAlignment="Stretch"
              VerticalAlignment="Stretch"
              TextBlock.Foreground="{DynamicResource Brush_ToolBarForeground}">
            <Border x:Name="EmptyLibraryBorder"                    
                    Background="{DynamicResource Brush_StandardBackground}"
                    Visibility="Hidden"
                    Width="250"
                    Height="300"
                    CornerRadius="4"
                    BorderThickness="1"
                    BorderBrush="Gray">
                
                <Border.Effect>
                    <DropShadowEffect Opacity="0.5" BlurRadius="3" />
                </Border.Effect>
                
                <Border Margin="16">
                    <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
                        <TextBlock TextAlignment="Center" FontSize="18" Text="Windows 7 Library Demo" />
                        <Image Margin="16" Source="{Binding ShellIcon, Converter={StaticResource DefaultImageConverter}}" Width="128" />
                        <TextBlock TextAlignment="Center" FontSize="12" FontStyle="Italic" Text="There is no open library" />
                        <TextBlock Margin="0,0,0,4" TextAlignment="Center" FontSize="12" FontStyle="Italic" Text="Choose 'Open Library' or 'New Library' to open a library" TextWrapping="Wrap" />
                        <TextBlock TextAlignment="Center" FontSize="12" FontStyle="Italic" Text="You may also click on 'Change Skin' to change skin at any time" TextWrapping="Wrap" />
                    </StackPanel>
                </Border>
            </Border>            
            
            <Border x:Name="LibraryBorder" Visibility="Visible" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" TextBlock.Foreground="White">
                <DockPanel LastChildFill="True">

                    <Border DockPanel.Dock="Top" Padding="8" Margin="8">
                        <DockPanel>
                            <Image DockPanel.Dock="Left"
                                   Margin="16"
                                   Source="{Binding ShellIcon, Converter={StaticResource DefaultImageConverter}}" Width="48" />
                            
                            <StackPanel VerticalAlignment="Center">
                                <WrapPanel>
                                    <TextBlock Text="{Binding Name}" VerticalAlignment="Center" FontSize="28" />
                                    <TextBlock Text="Library" Margin="8,0,0,0" VerticalAlignment="Center" FontSize="28" />
                                </WrapPanel>
                                <TextBlock Text="{Binding DefaultSaveFolder}" Margin="8,0,0,0" VerticalAlignment="Center" FontSize="20" />
                            </StackPanel>                            
                            
                        </DockPanel>                        
                    </Border>

                    <ListBox Style="{DynamicResource LibraryListBox}"
                         ItemsSource="{Binding Path=Folders}"
                         IsSynchronizedWithCurrentItem="True"/>
                    
                </DockPanel>
            </Border>
            
        </Grid>        
        
        <DataTemplate.Triggers>
            <DataTrigger Binding="{Binding}" Value="{x:Static models:Library.Null}">
                <Setter TargetName="EmptyLibraryBorder" Property="Visibility" Value="Visible" />
                <Setter TargetName="LibraryBorder" Property="Visibility" Value="Hidden" />
            </DataTrigger>
        </DataTemplate.Triggers>
        
    </DataTemplate>

    <DataTemplate x:Key="FolderDataTemplate" DataType="{x:Type models:Folder}">
        <StackPanel VerticalAlignment="Center" Margin="16" HorizontalAlignment="Left" TextBlock.Foreground="White">
            <TextBlock Text="{Binding Path=Name}" FontSize="14" FontWeight="Bold" Margin="4,0" HorizontalAlignment="Left" />
            <TextBlock Text="{Binding Path=Path}" FontSize="11" Margin="4,0" HorizontalAlignment="Left" />
        </StackPanel>
    </DataTemplate>
    

    <!-- ToolBarButton -->

    <Style TargetType="{x:Type controls:ToolBarButton}">
        <Setter Property="SnapsToDevicePixels" Value="true"/>
        <Setter Property="OverridesDefaultStyle" Value="true"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Padding" Value="6,-6,6,6"/>
        <Setter Property="FontFamily" Value="Segoe UI"/>
        <Setter Property="FontSize" Value="9.5"/>
        <Setter Property="MinWidth" Value="50"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type controls:ToolBarButton}">
                    <Grid>
                        <Rectangle x:Name="DividerShadow" Width="1" HorizontalAlignment="Left" Margin="0,1,0,1" Fill="{DynamicResource Brush_ToolBarEtchDark}"/>
                        <Rectangle x:Name="DividerHighlight" Width="1" HorizontalAlignment="Left" Margin="1,1,0,1" Fill="{DynamicResource Brush_ToolBarEtchLight}"/>
                        <Ellipse x:Name="Blur" Width="30" Height="30" Fill="{DynamicResource Brush_ButtonGlow}" Opacity="0">
                            <Ellipse.Effect>
                                <BlurEffect Radius="10" />
                            </Ellipse.Effect>
                        </Ellipse>
                        <Border x:Name="OverlayBorder" Margin="1,0,0,1" Background="{DynamicResource Brush_ToolBarButtonOverlay}" Opacity="0" />
                        <Border x:Name="IsCheckedBorder" Margin="1,0,0,1" Background="{DynamicResource Brush_ToolBarButtonOverlay}" Opacity="0" />

                        <Grid x:Name="ContentGrid" Margin="1,0,-1,0">
                            <Grid.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform/>
                                    <SkewTransform/>
                                    <RotateTransform/>
                                    <TranslateTransform/>
                                </TransformGroup>
                            </Grid.RenderTransform>
                            <TextBlock x:Name="ContentHostBlur" Foreground="#FFCCE1FF" Text="{TemplateBinding Text}" HorizontalAlignment="Center" Margin="10,0,8,6" VerticalAlignment="Bottom" Opacity="0">
              <TextBlock.Effect>
                <BlurEffect Radius="3" />
              </TextBlock.Effect>
                            </TextBlock>
                            <Image x:Name="IconImage" Source="{TemplateBinding ImageSource}" Stretch="Uniform" Width="20" MaxHeight="20"  VerticalAlignment="Center" Margin="{TemplateBinding Padding}" />
                            <TextBlock x:Name="ContentHost" Foreground="{DynamicResource Brush_ToolBarForeground}"  Text="{TemplateBinding Text}" HorizontalAlignment="Center" Margin="10,0,8,6" VerticalAlignment="Bottom"/>
                        </Grid>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsDividerVisible" Value="False">
                            <Setter TargetName="DividerShadow" Property="Visibility" Value="Hidden" />
                            <Setter TargetName="DividerHighlight" Property="Visibility" Value="Hidden" />
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <!--<Setter TargetName="ContentGrid" Property="Effect">
                <Setter.Value>
                  <DropShadowEffect ShadowDepth="0" Color="{DynamicResource Color_ButtonGlow}" BlurRadius="3" />
                </Setter.Value>
              </Setter>-->
                            <Setter TargetName="ContentHostBlur" Property="Opacity" Value=".5" />
                        </Trigger>
                        <Trigger Property="IsChecked" Value="True">
                            <Setter TargetName="IsCheckedBorder" Property="Opacity" Value="1" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="IconImage" Property="Opacity" Value="0.5" />
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Trigger.EnterActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimation Duration="00:00:00.15" Storyboard.TargetName="OverlayBorder" Storyboard.TargetProperty="Opacity" To="1"/>
                                        <DoubleAnimation Duration="00:00:00.15" Storyboard.TargetName="Blur" Storyboard.TargetProperty="Opacity" To="1"/>
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.EnterActions>
                            <Trigger.ExitActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimation Duration="00:00:00.3" Storyboard.TargetName="OverlayBorder" Storyboard.TargetProperty="Opacity" />
                                        <DoubleAnimation Duration="00:00:00.3" Storyboard.TargetName="Blur" Storyboard.TargetProperty="Opacity" />
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.ExitActions>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- ScrollButton -->

    <Style x:Key="ScrollButton" TargetType="RepeatButton">
        <Setter Property="SnapsToDevicePixels" Value="true"/>
        <Setter Property="OverridesDefaultStyle" Value="true"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Padding" Value="6,-6,6,6"/>
        <Setter Property="Foreground" Value="White"/>
        <Setter Property="FontFamily" Value="Segoe UI"/>
        <Setter Property="FontSize" Value="9.5"/>
        <Setter Property="MinWidth" Value="40"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="RepeatButton">
                    <Grid >
                        <Border Background="{DynamicResource Brush_StandardBackground}" BorderBrush="{DynamicResource Brush_StandardBorder}" BorderThickness="0,1" />
                        <Rectangle x:Name="Shadow" Width="1" HorizontalAlignment="Left" Margin="0,1,0,1" Fill="#60000000"/>
                        <Rectangle x:Name="Highlight" Width="1" HorizontalAlignment="Left" Margin="1,1,0,1" Fill="#60FFFFFF"/>
                        <Border x:Name="OverlayBorder" Margin="1,0,0,0">
                            <Border.Background>
                                <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                                    <GradientStop Offset="0" Color="#00FFFFFF"/>
                                    <GradientStop Offset="1" Color="#00FFFFFF"/>
                                </LinearGradientBrush>
                            </Border.Background>
                        </Border>
                        <Path
              x:Name="Arrow"
              Width="16"
              Height="28"
              Data="{DynamicResource RightArrow}"
              Stretch="Fill"
              Stroke="#000000"
              StrokeThickness="1">
                            <Path.Fill>
                                <RadialGradientBrush>
                                    <GradientStop Offset="0" Color="#484848"/>
                                    <GradientStop Offset="1" Color="#2E2E2E"/>
                                </RadialGradientBrush>
                            </Path.Fill>
                        </Path>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="Tag" Value="Left">
                            <Setter TargetName="Shadow" Property="HorizontalAlignment" Value="Right" />
                            <Setter TargetName="Shadow" Property="Margin" Value="0,1,1,1" />
                            <Setter TargetName="Highlight" Property="HorizontalAlignment" Value="Right" />
                            <Setter TargetName="Highlight" Property="Margin" Value="0,1,0,1" />
                            <Setter TargetName="Arrow" Property="Data" Value="{DynamicResource LeftArrow}" />
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Trigger.EnterActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <ColorAnimation Duration="00:00:00.1" Storyboard.TargetName="OverlayBorder" Storyboard.TargetProperty="(Border.Background).(LinearGradientBrush.GradientStops)[0].(GradientStop.Color)" To="#40FFFFFF"/>
                                        <ColorAnimation Duration="00:00:00.1" Storyboard.TargetName="OverlayBorder" Storyboard.TargetProperty="(Border.Background).(LinearGradientBrush.GradientStops)[1].(GradientStop.Color)" To="#08FFFFFF"/>
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.EnterActions>
                            <Trigger.ExitActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <ColorAnimation Duration="00:00:00.1" Storyboard.TargetName="OverlayBorder" Storyboard.TargetProperty="(Border.Background).(LinearGradientBrush.GradientStops)[0].(GradientStop.Color)"/>
                                        <ColorAnimation Duration="00:00:00.1" Storyboard.TargetName="OverlayBorder" Storyboard.TargetProperty="(Border.Background).(LinearGradientBrush.GradientStops)[1].(GradientStop.Color)"/>
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.ExitActions>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- Button -->

    <Style TargetType="{x:Type Button}">
        <Setter Property="SnapsToDevicePixels" Value="true"/>
        <Setter Property="OverridesDefaultStyle" Value="true"/>
        <Setter Property="MinHeight" Value="23"/>
        <Setter Property="MinWidth" Value="75"/>
        <Setter Property="Foreground" Value="White"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Grid SnapsToDevicePixels="True">
                        <Border x:Name="Border" BorderBrush="{DynamicResource Brush_EtchDark}" BorderThickness="1" CornerRadius="2" Background="{DynamicResource Brush_ControlNormal}">
                        </Border>
                        <Border Margin="0,1,0,-1" BorderBrush="{DynamicResource Brush_EtchLight}" BorderThickness="0,1" CornerRadius="2"/>
                        <ContentPresenter HorizontalAlignment="Center" Margin="2" VerticalAlignment="Center" RecognizesAccessKey="True"/>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsDefaulted" Value="true">
                            <Setter TargetName="Border" Property="BorderBrush" Value="#202020"/>
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter TargetName="Border" Property="Background" Value="{DynamicResource Brush_ControlMouseOver}" />
                        </Trigger>
                        <Trigger Property="IsPressed" Value="true">
                            <Setter TargetName="Border" Property="Background" Value="{DynamicResource Brush_ControlPressed}" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter TargetName="Border" Property="Opacity" Value="0.5"/>
                            <Setter Property="Foreground" Value="#A0A0A0"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- TextBox -->

    <Style TargetType="{x:Type TextBox}">
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="OverridesDefaultStyle" Value="True"/>
        <Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>
        <Setter Property="FontSize" Value="14"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="AllowDrop" Value="true"/>
        <Setter Property="Foreground" Value="White"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TextBox}">
                    <Grid>
                        <Border BorderBrush="#30FFFFFF" BorderThickness="1" CornerRadius="2" Background="{DynamicResource Brush_DarkControlBackground}">
                        </Border>
                        <Border Name="Border" BorderBrush="#B0000000" BorderThickness="0,1,0,0" CornerRadius="1" Margin="1" Height="3" VerticalAlignment="Top">
                            <Border.Background>
                                <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                                    <GradientStop Offset="0" Color="#60000000"/>
                                    <GradientStop Offset="1" Color="#00000000"/>
                                </LinearGradientBrush>
                            </Border.Background>
                        </Border>
                        <ScrollViewer x:Name="PART_ContentHost" Margin="5,3,5,2"/>

                        <TextBlock
                x:Name="WatermarkTextBlock"
                Margin="8,3,8,2"
                VerticalAlignment="Stretch"
                Foreground="#B0FFFFFF"
                IsHitTestVisible="False"
                Opacity="0"
                FontStyle="Italic"
                Text="{TemplateBinding Tag}" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="Border" Property="Background" Value="#EEEEEE"/>
                            <Setter TargetName="Border" Property="BorderBrush" Value="#EEEEEE"/>
                            <Setter Property="Foreground" Value="#888888"/>
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="Text" Value=""/>
                                <Condition Property="IsFocused" Value="False"/>
                            </MultiTrigger.Conditions>
                            <MultiTrigger.EnterActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimation Duration="00:00:00.1" Storyboard.TargetName="WatermarkTextBlock" Storyboard.TargetProperty="Opacity" To="1.0"/>
                                    </Storyboard>
                                </BeginStoryboard>
                            </MultiTrigger.EnterActions>
                            <MultiTrigger.ExitActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimation Duration="00:00:00.1" Storyboard.TargetName="WatermarkTextBlock" Storyboard.TargetProperty="Opacity" To="0.0"/>
                                    </Storyboard>
                                </BeginStoryboard>
                            </MultiTrigger.ExitActions>
                        </MultiTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


    <Style x:Key="ScrollBarPageButton" TargetType="{x:Type RepeatButton}">
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="OverridesDefaultStyle" Value="true"/>
        <Setter Property="IsTabStop" Value="false"/>
        <Setter Property="Focusable" Value="false"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type RepeatButton}">
                    <Border Background="Transparent"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="HorizontalScrollBarThumb" TargetType="{x:Type Thumb}">
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="OverridesDefaultStyle" Value="true"/>
        <Setter Property="IsTabStop" Value="false"/>
        <Setter Property="Focusable" Value="false"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Thumb}">
                    <Grid Background="Transparent">
                        <Border
                Height="8"
                Background="#FFF"
                BorderThickness="0.5,1"
                CornerRadius="3"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="VerticalScrollBarThumb" TargetType="{x:Type Thumb}">
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="OverridesDefaultStyle" Value="true"/>
        <Setter Property="IsTabStop" Value="false"/>
        <Setter Property="Focusable" Value="false"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Thumb}">
                    <Grid Background="Transparent">
                        <Border
                Width="8"
                Background="#FFF"
                BorderThickness="1,0.5"
                CornerRadius="3"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <ControlTemplate x:Key="VerticalScrollBar" TargetType="{x:Type ScrollBar}">
        <Grid Width="8">
            <Border Width="8" Background="#18000000" CornerRadius="3"/>
            <Track Name="PART_Track" IsDirectionReversed="true">
                <Track.DecreaseRepeatButton>
                    <RepeatButton Command="ScrollBar.PageUpCommand" Style="{StaticResource ScrollBarPageButton}"/>
                </Track.DecreaseRepeatButton>
                <Track.Thumb>
                    <Thumb x:Name="Thumb" Opacity="0.25" Style="{StaticResource VerticalScrollBarThumb}"/>
                </Track.Thumb>
                <Track.IncreaseRepeatButton>
                    <RepeatButton Command="ScrollBar.PageDownCommand" Style="{StaticResource ScrollBarPageButton}"/>
                </Track.IncreaseRepeatButton>
            </Track>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Trigger.EnterActions>
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimation
                  Duration="0:0:0.25"
                  Storyboard.TargetName="Thumb"
                  Storyboard.TargetProperty="Opacity"
                  To="1"/>
                        </Storyboard>
                    </BeginStoryboard>
                </Trigger.EnterActions>
                <Trigger.ExitActions>
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimation Duration="0:0:0.25" Storyboard.TargetName="Thumb" Storyboard.TargetProperty="Opacity"/>
                        </Storyboard>
                    </BeginStoryboard>
                </Trigger.ExitActions>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="HorizontalScrollBar" TargetType="{x:Type ScrollBar}">
        <Grid Height="8">
            <Border Height="8" Background="#18000000" CornerRadius="3"/>
            <Track Name="PART_Track" IsDirectionReversed="false">
                <Track.DecreaseRepeatButton>
                    <RepeatButton Command="ScrollBar.PageUpCommand" Style="{StaticResource ScrollBarPageButton}"/>
                </Track.DecreaseRepeatButton>
                <Track.Thumb>
                    <Thumb x:Name="Thumb" Opacity="0.25" Style="{StaticResource HorizontalScrollBarThumb}"/>
                </Track.Thumb>
                <Track.IncreaseRepeatButton>
                    <RepeatButton Command="ScrollBar.PageDownCommand" Style="{StaticResource ScrollBarPageButton}"/>
                </Track.IncreaseRepeatButton>
            </Track>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Trigger.EnterActions>
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimation
                  Duration="0:0:0.25"
                  Storyboard.TargetName="Thumb"
                  Storyboard.TargetProperty="Opacity"
                  To="1"/>
                        </Storyboard>
                    </BeginStoryboard>
                </Trigger.EnterActions>
                <Trigger.ExitActions>
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimation Duration="0:0:0.25" Storyboard.TargetName="Thumb" Storyboard.TargetProperty="Opacity"/>
                        </Storyboard>
                    </BeginStoryboard>
                </Trigger.ExitActions>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style TargetType="{x:Type ScrollBar}">
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="OverridesDefaultStyle" Value="true"/>
        <Setter Property="Template" Value="{StaticResource VerticalScrollBar}"/>
        <Style.Triggers>
            <Trigger Property="Orientation" Value="Horizontal">
                <Setter Property="Template" Value="{StaticResource HorizontalScrollBar}"/>
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style TargetType="{x:Type ScrollViewer}">
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ScrollViewer}">
                    <Grid x:Name="Grid" Background="Transparent">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="Auto"/>
                        </Grid.ColumnDefinitions>
                        <ScrollContentPresenter
              x:Name="PART_ScrollContentPresenter"
              Margin="0,0,0,0"
              Grid.ColumnSpan="2"
              CanHorizontallyScroll="False"
              CanVerticallyScroll="False"/>
                        <ScrollBar
              x:Name="PART_VerticalScrollBar"
              Grid.Column="1"
              Grid.Row="0"
              Margin="6"
              AutomationProperties.AutomationId="VerticalScrollBar"
              Maximum="{TemplateBinding ScrollableHeight}"
              Minimum="0"
              Value="{Binding Path=VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}"
              ViewportSize="{TemplateBinding ViewportHeight}"
              Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="LibraryListBoxItem" TargetType="{x:Type ListBoxItem}">
        <Setter Property="OverridesDefaultStyle" Value="True" />
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ListBoxItem}">
                    <Border x:Name="BackgroundBorder" Background="#00000000">
                        <DockPanel Margin="8">
                            <Image Width="64" DockPanel.Dock="Left">
                                <Image.Source>
                                    <DrawingImage>
                                        <DrawingImage.Drawing>
                                            <GeometryDrawing Brush="White" Geometry="M32.92,5.71L32.92,19.76 41.56,12.62z M26.92,6.40L26.92,6.99 26.92,20.42 26.92,21.21 26.92,21.69 5.85,21.69 5.85,19.53 24.45,19.53C24.55,19.53,24.63,19.45,24.63,19.35L24.63,17.27 24.63,16.44 24.63,5.72 26.92,5.72z M1.78,17.75L1.78,7.23C1.86,6.57,3.84,6.26,4.65,6.26L6.88,6.26 6.88,4.11C6.89,3.99,6.96,1.96,7.71,1.78L22.85,1.78 22.85,2.46 22.85,3.05 22.85,16.48 22.85,17.27 22.85,17.75z M28.52,3.93L24.63,3.93 24.63,3.09 24.63,2.46 24.63,0.18C24.63,0.08,24.55,-2.64E-23,24.45,-2.64E-23L6.36,-2.64E-23C6.31,-2.64E-23,6.26,0.02,6.23,0.05L0.05,6.23C0.02,6.26,1.19E-06,6.31,1.19E-06,6.36L1.19E-06,19.35C1.19E-06,19.45,0.08,19.53,0.18,19.53L4.07,19.53 4.07,23.29C4.07,23.39,4.15,23.47,4.25,23.47L28.52,23.47C28.62,23.47,28.70,23.39,28.70,23.29L28.70,21.21 28.70,20.38 28.70,7.03 28.70,6.40 28.70,4.12C28.70,4.02,28.62,3.93,28.52,3.93" />
                                        </DrawingImage.Drawing>
                                    </DrawingImage>
                                </Image.Source>                                
                            </Image>
                            <ContentPresenter Margin="4,0,0,0" />
                        </DockPanel>                        
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="BackgroundBorder" Property="Background">
                                <Setter.Value>
                                    <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                                        <GradientStop Color="#80FFFFFF" Offset="0" />
                                        <GradientStop Color="#40FFFFFF" Offset="1" />
                                    </LinearGradientBrush>
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                        <Trigger Property="IsSelected" Value="True">
                            <Setter TargetName="BackgroundBorder" Property="Background">
                                <Setter.Value>
                                    <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                                        <GradientStop Color="#40000000" Offset="0" />
                                        <GradientStop Color="#80000000" Offset="1" />
                                    </LinearGradientBrush>
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="LibraryListBox" TargetType="ListBox">
        <Setter Property="ItemTemplate" Value="{DynamicResource FolderDataTemplate}" />
        <Setter Property="ItemContainerStyle" Value="{DynamicResource LibraryListBoxItem}" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Foreground" Value="{DynamicResource Brush_ToolBarForeground}" />
        <Setter Property="BorderThickness" Value="0" />        
    </Style>

    <Style x:Key="ContentControl" TargetType="{x:Type ContentControl}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ContentControl}">
                    <Border
                        BorderBrush="#90FFFFFF"
                        Background="{DynamicResource Brush_AlbumGlass}"
                        BorderThickness="1,1,0,0">
                        <Border.Effect>
                            <DropShadowEffect BlurRadius="12" Direction="225" ShadowDepth="3"/>
                        </Border.Effect>
                        <Grid>
                            <Path
                            Height="160"
                            Margin="1,0"
                            VerticalAlignment="Top"
                            Data="M0.5,0.5L214.5,0.5 214.5,168.5 212.8,168.4C197.7,167.1 181.8,166.5 165.5,166.5 95.3,166.5 34.0,178.9 1.3,197.3L0.5,197.8z"
                            Stretch="Fill">
                                <Path.Fill>
                                    <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                                        <GradientStop Offset="0" Color="#04FFFFFF"/>
                                        <GradientStop Offset="0.1" Color="#10FFFFFF"/>
                                        <GradientStop Offset="1.0" Color="#18FFFFFF"/>
                                    </LinearGradientBrush>
                                </Path.Fill>
                            </Path>
                            <Border BorderBrush="{DynamicResource Brush_AlbumGlassHighlight}" BorderThickness="1,0,0,0">
                                <ContentPresenter />
                            </Border>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- 
  *****************************************************************************
  OTHER NAMED RESOURCES 
  *****************************************************************************
  -->


</ResourceDictionary>